---
import { BaseLayout } from '../layouts';
import { ForgotPasswordContent } from '../components/sections';
import { SITE_BASE_URL, VIEWPORT_NO_ZOOM, FORGOT_PASSWORD_PAGE_PATH } from '../constants';
import '../styles/components/forgot_password.css';
import { getCurrentLang } from '../utils';

const langDefault = getCurrentLang();
const langKey = langDefault.startsWith('zh') ? 'zh' : 'en';
const titleZh = '忘记密码 · 张人大';
const titleEn = 'Forgot Password · Renda Zhang';
const title = langKey === 'zh' ? titleZh : titleEn;
Astro.response.headers.set('Cache-Control', 'no-store');
---

<BaseLayout
  lang={langDefault}
  titleZh={titleZh}
  titleEn={titleEn}
  title={title}
  description="Forgot password page"
  viewport={VIEWPORT_NO_ZOOM}
  canonical={`${SITE_BASE_URL}${FORGOT_PASSWORD_PAGE_PATH}/`}
  metaRobots="noindex, nofollow"
  showChatWidget={false}
>
  <Fragment slot="head">
    <meta name="referrer" content="same-origin" />
  </Fragment>
  <ForgotPasswordContent client:load />
</BaseLayout>
